// ****************************************************************************
//
// Logic 2: First room
//
// ****************************************************************************

#include "defines.txt"

if (new_room) {
  load.sound(1);
  sound(1,f50);
  set(f100);
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(37);
  accept.input();
  status.line.on();
// Check what room the player came from and position them on the
// screen accordingly here, e.g:
// if (prev_room_no == 5) {
//   position(ego,12,140);
// }
  animate.obj(o1);
load.view(99);
set.view(o1,99);
position(o1,95,115);
draw(o1);

animate.obj(o2);
load.view(80);
set.view(o2,80);
position(o2,20,70);
  show.pic();
  }

  if ((prev_room_no == 1 ||    // just come from intro screen
      prev_room_no == 0)) {    // or just started game
if(f100){
print("So, %s1. You wish to be a wizard.");
print("I am Lewelto, and I am willing to teach you how to practice magic, pharmecutical studies, and to become a wizard.");
print("I must tell you, the path of a wizard is not an easy one as it involves courage, mastering magic, being at one with the world,");
print("Fighting hideous monsters,");
print("And most importantly: Being the best you can be.");
print("Are you sure you wish to be a wizard?");
reset(f100);
}
if(said ("no")){
 print("Fine. Why did you come to me then?");
 quit(1);
 }
 if(said("yes")){
 print("Very well, %s1. You have chosen your destiny.");
 set(f94);
  new.room(3);
  }
 }
 if(prev_room_no == 3){
 if(f100){
 print("Now you must learn your first spell.");
 draw(o2);
 end.of.loop(o2,f90);
 set(f90);
 reset(f100);
  if(f90){
  normal.cycle(o2);
  reset(f90);
  display(15,1,"FLAMGIG");
  set(f91);
   if(f91){
   print("This is Flamgig. It will light up any cave or room. It costs 4 mana and is in the First Circle of Magic.");
   reset(f91);
   erase(o2);
   print("Repeat after me...");
   print("FLAMGIG");
   }
  }
  }
  if(said("Flamgig")){
  draw(o2);
  normal.cycle(o2);
  set(f92);
  if(f92){
    print("Good. You have learned your first spell.");
    new.room(3);
 }
}
}
 return();